package com.sec.lsp.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sec.base.utils.AjaxJson;
import com.sec.lsp.service.LSPService;

@RestController
@RequestMapping(value = "/lsp")
@CrossOrigin
public class LSPController {

	@Autowired
	private LSPService lspService;

	/**
	 * 图片隐藏
	 * 
	 * @param dataPath    要隐藏的数据文件
	 * @param carrierPath 载体图片
	 * @param resultPath  隐藏后的图片
	 * @return
	 */
	@RequestMapping(value = "picHide", method = RequestMethod.POST)
	public AjaxJson picHide(String dataPath, String carrierPath, String resultPath) {
		return lspService.picHide(dataPath, carrierPath, resultPath);
	}

	/**
	 * 导出数据文件
	 * 
	 * @param resultPath 隐藏后的图片
	 * @param dataPath   导出图片
	 * @return
	 */
	@RequestMapping(value = "picShow", method = RequestMethod.POST)
	public AjaxJson picShow(String resultPath, String dataPath) {
		return lspService.picShow(resultPath, dataPath);
	}
}
